if (!window.Parameters) var Parameters = {
    parsed : false,
    __names : [],
    __values : {},
    getParameter : function (name, trimNulltoEmpty) {
        if (!this.parsed)
            this.__parseParameters ();

        var value = this.__values [name];
        return value === undefined ? trimNulltoEmpty ? "" : null : value;
    },
    getParameterNames : function () {
        if (!this.parsed)
            this.__parseParameters ();
        return this.__names;
    },
    __parseParameters : function () {
        this.parsed = true;
        this.__names = [];
        this.__values = {};
        if (location.search) {
            var a = location.search.substring (1).split ('&');
            for (var i = 0; i < a.length; i ++) {
                var p = a [i];
                var b = p.split ('=');
                if (this.__values [b[0]] === undefined) {
                    this.__names.push (b[0]);
                    this.__values [b[0]] = decodeURIComponent (b[1]);
                } else {
                    var o = this.__values [b[0]];
                    if (typeof o == 'array' || o instanceof Array) {
                        o.push (b[1]);
                    } else {
                        var x = [];
                        x.push (o);
                        x.push (b[1]);
                        this.__values [b[0]] = x;
                    }
                }
            }
        }
    }
};